Optimal. Leaf size=77 \[ -\frac {a d (a+b x)^{1+n}}{b^2 (1+n)}+\frac {d (a+b x)^{2+n}}{b^2 (2+n)}-\frac {c (a+b x)^{1+n} \, _2F_1\left (1,1+n;2+n;1+\frac {b x}{a}\right )}{a (1+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {966, 81, 67}
\begin {gather*} -\frac {a d (a+b x)^{n+1}}{b^2 (n+1)}+\frac {d (a+b x)^{n+2}}{b^2 (n+2)}-\frac {c (a+b x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b x}{a}+1\right )}{a (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 67
Rule 81
Rule 966
Rubi steps
\begin {align*} \int \frac {(a+b x)^n \left (c+d x^2\right )}{x} \, dx &=\frac {d (a+b x)^{2+n}}{b^2 (2+n)}+\frac {\int \frac {(a+b x)^n \left (b^2 c (2+n)-a b d (2+n) x\right )}{x} \, dx}{b^2 (2+n)}\\ &=-\frac {a d (a+b x)^{1+n}}{b^2 (1+n)}+\frac {d (a+b x)^{2+n}}{b^2 (2+n)}+c \int \frac {(a+b x)^n}{x} \, dx\\ &=-\frac {a d (a+b x)^{1+n}}{b^2 (1+n)}+\frac {d (a+b x)^{2+n}}{b^2 (2+n)}-\frac {c (a+b x)^{1+n} \, _2F_1\left (1,1+n;2+n;1+\frac {b x}{a}\right )}{a (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 64, normalized size = 0.83 \begin {gather*} -\frac {(a+b x)^{1+n} \left (a d (a-b (1+n) x)+b^2 c (2+n) \, _2F_1\left (1,1+n;2+n;1+\frac {b x}{a}\right )\right )}{a b^2 (1+n) (2+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (b x +a \right )^{n} \left (d \,x^{2}+c \right )}{x}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 202 vs.
\(2 (61) = 122\).
time = 2.58, size = 345, normalized size = 4.48 \begin {gather*} - \frac {b^{n} c n \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{\Gamma \left (n + 2\right )} - \frac {b^{n} c \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{\Gamma \left (n + 2\right )} + d \left (\begin {cases} \frac {a^{n} x^{2}}{2} & \text {for}\: b = 0 \\\frac {a \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} + \frac {a}{a b^{2} + b^{3} x} + \frac {b x \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} & \text {for}\: n = -2 \\- \frac {a \log {\left (\frac {a}{b} + x \right )}}{b^{2}} + \frac {x}{b} & \text {for}\: n = -1 \\- \frac {a^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {a b n x \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} n x^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} x^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} & \text {otherwise} \end {cases}\right ) - \frac {b b^{n} c n x \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{a \Gamma \left (n + 2\right )} - \frac {b b^{n} c x \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{a \Gamma \left (n + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (d\,x^2+c\right )\,{\left (a+b\,x\right )}^n}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________